﻿using System;
using System.Runtime.Serialization;

namespace Mono.Cecil
{
	// Token: 0x02000096 RID: 150
	[Serializable]
	public sealed class ResolutionException : Exception
	{
		// Token: 0x17000126 RID: 294
		// (get) Token: 0x06000579 RID: 1401 RVA: 0x0001E8EC File Offset: 0x0001CAEC
		public MemberReference Member
		{
			get
			{
				return this.member;
			}
		}

		// Token: 0x17000127 RID: 295
		// (get) Token: 0x0600057A RID: 1402 RVA: 0x0001E904 File Offset: 0x0001CB04
		public IMetadataScope Scope
		{
			get
			{
				TypeReference typeReference = this.member as TypeReference;
				bool flag = typeReference != null;
				IMetadataScope scope;
				if (flag)
				{
					scope = typeReference.Scope;
				}
				else
				{
					TypeReference declaringType = this.member.DeclaringType;
					bool flag2 = declaringType != null;
					if (!flag2)
					{
						throw new NotSupportedException();
					}
					scope = declaringType.Scope;
				}
				return scope;
			}
		}

		// Token: 0x0600057B RID: 1403 RVA: 0x0001E958 File Offset: 0x0001CB58
		public ResolutionException(MemberReference member) : base("Failed to resolve " + member.FullName)
		{
			bool flag = member == null;
			if (flag)
			{
				throw new ArgumentNullException("member");
			}
			this.member = member;
		}

		// Token: 0x0600057C RID: 1404 RVA: 0x0001E998 File Offset: 0x0001CB98
		public ResolutionException(MemberReference member, Exception innerException) : base("Failed to resolve " + member.FullName, innerException)
		{
			bool flag = member == null;
			if (flag)
			{
				throw new ArgumentNullException("member");
			}
			this.member = member;
		}

		// Token: 0x0600057D RID: 1405 RVA: 0x00003F9A File Offset: 0x0000219A
		private ResolutionException(SerializationInfo info, StreamingContext context) : base(info, context)
		{
		}

		// Token: 0x04000161 RID: 353
		private readonly MemberReference member;
	}
}
